import { IsNotEmpty, IsNumberString, IsString } from 'class-validator';

export class FindUserDto {
  @IsNumberString({}, { message: '页码必须是个数字字符串' })
  @IsNotEmpty({ message: '页码不能为空' })
  current: string;

  @IsNumberString({}, { message: '一页数据量必须是个数字字符串' })
  @IsNotEmpty({ message: '一页数据量不能为空' })
  size: string;

  @IsString({ message: '姓名必须是个字符串' })
  @IsNotEmpty({ message: '姓名不能为空' })
  name: string;

  @IsNumberString({}, { message: '年龄必须是个数字字符串' })
  @IsNotEmpty({ message: '年龄不能为空' })
  age: string;
}
